package cn.gov.pbc.address.common;

public class LoanConst {
	
	public static final String STANDARD_DATE_FORMAT = "yyyyMMdd";
	
	public static final String DASH_DATE_FORMAT = "yyyy-MM-dd";
	
	public static final String SLASH_DATE_FORMAT = "yyyy/MM/dd";
	
	public enum ClientType{
		SMALL_FIRM(0, "小微企业"),
		SMALL_FIRM_OWNER(1, "小微企业主"),
		INDIVIDUAL(2, "个体工商户");
		
		private int code;
		
		private String value;
		
		private ClientType(int code, String value){
			this.code = code;
			this.value = value;
		}
		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		public static ClientType codeOf(int code){
            for(ClientType clientType : values()){
                if(clientType.getCode() == code){
                    return clientType;
                }
            }
            return null;
        }
		public static ClientType searchByValue(String value){
			for(ClientType clientType : values()){
				if(clientType.getValue().equals(value)){
					return clientType;
				}
			}
			return null;
		}
	}
	
	public enum LoanStatus{
		PASS(0, "正常"),
		MENTION(1, "关注"),
		SUB(2, "次级"),
		DOUTFUL(3, "可疑"),
		LOSS(4, "损失");
		
		private int code;
		
		private String value;
		
		private LoanStatus(int code, String value){
			this.code = code;
			this.value = value;
		}
		public int getCode() {
			return code;
		}

		public String getValue() {
			return value;
		}
		public static LoanStatus codeOf(int code){
            for(LoanStatus loanStatus : values()){
                if(loanStatus.getCode() == code){
                    return loanStatus;
                }
            }
            return null;
        }
		public static LoanStatus searchByValue(String value){
			for(LoanStatus loanStatus : values()){
				if(loanStatus.getValue().equals(value)){
					return loanStatus;
				}
			}
			return null;
		}
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	
	

}
